<script id="nodeTmpl" type="application/x-jquery-tmpl">
    <div class="node ${stage} arity${arity}" title="${description}">
        <div class="nodename">${name}</div>
    </div>
</script>

<script id="nodeListTmpl" type="application/x-jquery-tmpl">
    <li class="node ${stage} arity${arity} ui-medium-flat" data-stage="${stage}" data-type="${name}" title="${description}">
        <div class="nodename">${name.replace(/^[^\.]+\./, "")}</div>
    </li>
</script>

<script id="nodeTreeTmpl" type="application/x-jquery-tmpl">
    <li class="node ${stage} arity${arity} ui-medium-flat" data-stage="${stage}" data-type="${type}" title="${description}">
        <span class="viewingbutton" title="Focus Viewer"></span>
        <div class="nodename">${name}</div>
        <span class="ignorebutton" title="Ignore Node"></span>
    </li>
</script>

<script id="paramTmpl" type="application/x-jquery-tmpl">
    <div class="node_param_header ui-widget-header">
        <span class="node_param_type">${nodetype}</span>
        <span class="node_param_name">
            <input type="text" class="nameedit" id="${nodename}_rename" value="${nodename}" />
        </span>
    </div>
    <div class="node_params">
        <table id="node_param_list" class="node_param_table">

        </table>
    </div>                    
</script>

<script id="nodeMenuTmpl" type="application/x-jquery-tmpl">
    <div class="nodemenu" id="nodemenu">
        <div id="node_context">
            <ul>
                <li id="delete_node">Delete</li>
                <li id="refresh_node">Refresh</li>
            </ul>
            <hr width="90%" />
        </div>
        
        <ul>
        {% templatetag openvariable %}each(i,stage) stages{% templatetag closevariable %}    
            <li class="topmenu itemname">
                ${stage.name[0].toUpperCase() + stage.name.replace("_", " ").slice(1)}
                <ul class="nodemenu submenu hidden">
                {% templatetag openvariable %}each(ii,node) stage.nodes{% templatetag closevariable %}    
                    <li data-name="${node.name}">
                        ${node.name.replace(/^[^\.]+./, "")}
                    </li>
                {% templatetag openvariable %}/each{% templatetag closevariable %}    
                </ul>
            </li>
        {% templatetag openvariable %}/each{% templatetag closevariable %}    
        </ul>
    </div>
</script>
